package com.stlm2.dems.user.dao.impl;

import org.springframework.stereotype.Repository;

import com.stlm2.dems.user.entity.Role;
import com.stlm2.dems.user.dao.RoleDao;
import com.stlm2.core.base.impl.BaseDaoImpl;

import java.util.List;

@Repository("roleDao")
public class RoleDaoImpl extends BaseDaoImpl<Role> implements RoleDao {

    @Override
    public List<Role> getByUserId(int userId) {
        return  selectList("getByUserId",userId);
    }

    @Override
    public Role getByName(String name) {
        return selectOne("getByName",name);
    }

    @Override
    public Role getByLabel(String label) {
        return selectOne("getByLabel",label);
    }
}